import axios from '../../utils/axios/request'

// 获取列表
export function getListApi(params){
    return axios({
        url:'/users/user-list',
        method:'get',
        params
    })
}

// 新增用户
export function addUserApi(data){
    return axios({
        url:"/users/save-user",
        method:'post',
        data
    })
}

// 删除用户
export function deleteUserApi(params){
    return axios({
        url:'/users/delete-user',
        method:'get',
        params
    }) 
}

// 新增用户
export function updateUserApi(data){
    return axios({
        url:'/users/update-user',
        method:'post',
        data
    })
}

// 头像上传
export function uploadApi(data){
    return axios({
        url:"/users/upload-avatar",
        method:'post',
        data
    })
}